var zan = (
    function () {
        var z = 0;
        return function () {
            console.log(++z);
        }
    }
)();
zan();
zan();zan();z=0;zan();
zan();zan();zan();